package com.eminem.streamchar;

import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class StreamWriterTest1 {

	public static void main(String[] args) throws Exception {
		
		OutputStream out = new FileOutputStream("c:/b.txt");
		OutputStreamWriter isw = new OutputStreamWriter(out);
		
		BufferedWriter bw = new BufferedWriter(isw);
		
		String str = "nihaoa hello world";
		char[] chars = new char[str.length()];
		chars = str.toCharArray();
		bw.write(chars);
		
		
		bw.close();
	}
}
